package com.dgsrz.demo.util;

/**
 * Color
 * Range from 0 to 255 for each part.
 *
 * @author dgsrz
 */
public class Color {

    // 1. System
    public final static Color TRANSPARENT = new Color(0, 0, 0, 0);
    public final static Color BLACK       = new Color(0, 0, 0, 255);
    public final static Color WHITE       = new Color(255, 255, 255, 255);

    // 2. User defined
    public final static Color USER_BLUE   = new Color(46, 136, 248);
    public final static Color USER_GREEN  = new Color(26, 207, 26);
    public final static Color USER_RED    = new Color(243, 48, 77);
    public final static Color USER_ORANGE = new Color(255, 200, 32);

    private final float mRed;
    private final float mGreen;
    private final float mBlue;
    private final float mAlpha;

    public Color(float red, float green, float blue) {
        this(red, green, blue, 255);
    }

    public Color(float red, float green, float blue, float alpha) {
        this.mRed = red;
        this.mGreen = green;
        this.mBlue = blue;
        this.mAlpha = alpha;
    }

    public float getR() {
        return this.mRed;
    }

    public float getG() {
        return this.mGreen;
    }

    public float getB() {
        return this.mBlue;
    }

    public float getA() {
        return this.mAlpha;
    }
}
